package com.lemon.cloud.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.lemon.cloud.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import java.io.Serializable;

/**
    * 字典项
    */
@EqualsAndHashCode(callSuper = true)
@Data
public class SysDictItem extends BaseEntity implements Serializable {
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    /**
    * 字典ID
    */
    @Schema(description = "字典ID")
    @NotNull(message = "字典ID不能为空")
    private Long dictId;

    /**
    * 值
    */
    @Schema(description = "值",minLength = 1,maxLength = 100)
    @NotEmpty(message = "值不能为空")
    @Length(min = 1,max = 100,message = "值长度为1~100字符")
    private String value;

    /**
    * 标签
    */
    @Schema(description = "标签",minLength = 1,maxLength = 100)
    @NotEmpty(message = "标签不能为空")
    @Length(min = 1,max = 100,message = "标签长度为1~100字符")
    private String label;

    /**
    * 字典类型
    */
    @Schema(description = "字典类型")
    @NotEmpty(message = "字典类型不能为空")
    private String type;

    /**
    * 描述
    */
    @Schema(description = "描述",minLength = 1,maxLength = 200)
    @NotEmpty(message = "描述不能为空")
    @Length(min = 1,max = 200,message = "描述长度为1~200字符")
    private String description;

    /**
    * 排序（升序）
    */
    @Schema(description = "排序（升序）")
    @NotNull(message = "排序不能为空")
    private Integer sortOrder;

    /**
    * 备注
    */
    @Schema(description = "备注")
    private String remark;

    /**
    * 删除标记
    */
    @TableLogic
    private String delFlag;

    private static final long serialVersionUID = 1L;
}
